<extend name="Layout::member"/>
<block name="content">
    <div class="layout-content">
        <div class="mt15 pr15">
            <form action="{:U(index)}" method="get" class=" form-inline form-search mt15">
                <div class="form-group">
                    <label>关键字搜索</label>
                    <input type="text" placeholder="输入名字" class="form-control input-sm" name="name"  value="<?php echo $_SESSION['like']['order']; ?>"/>
                    <button type="submit" class="btn btn-success btn-sm">
                        <span class="glyphicon glyphicon-search"></span> 搜索
                    </button>
                    <label>时间搜索</label>
                    <input type="text" class="span2" value="" id="dpd1" name="start" >
                    <input type="text" class="span2" value="" id="dpd2"  name="end">
                    <script>
                        var nowTemp = new Date();
                        var now = new Date(nowTemp.getFullYear(), nowTemp.getMonth(), nowTemp.getDate(), 0, 0, 0, 0);
                        var checkin = $('#dpd1').fdatepicker({
                            onRender: function (date) {
                                return date.valueOf();
                            }
                        }).on('changeDate', function () {

                            $('#dpd2')[0].focus();
                        }).data('datepicker');
                        var checkout = $('#dpd2').fdatepicker({
                            onRender: function (date) {
                                return date.valueOf() <= checkin.date.valueOf() ? 'disabled' : '';
                            }
                        }).on('changeDate', function (ev) {
                            checkout.hide();
                        }).data('datepicker');
                    </script>
                    <button type="submit" class="btn btn-success btn-sm">
                        <span class="glyphicon glyphicon-search"></span> 搜索
                    </button>
                </div>

            </form>

        </div>



        <div class="clearfix"></div>


        <!--content-main start-->
        <div class="container-fluid content-main">
            <div class="row">
                <div class="col-md-12">
                    </form>
                    <table class="table table-hover mt15">
                        <thead>
                        <tr>
                            <th>预约人</th>
                            <th>手机号码</th>
                            <th>类别</th>
                            <th>预约时间</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <notempty name="list">
                            <foreach name="list" item="val">
                                <tr class="pages">
                                    <td>
                                        {$val.name}
                                    </td>
                                    <td>
                                        {$val.mobile}
                                    </td>
                                    <td>
                                        {$val.status}
                                    </td>
                                    <td>
                                        {$val.create}
                                    </td>
                                    <td>
                                        <a href="{:U('update',['id'=>$val['id']])}">修改</a>|
                                        <a href="{:U('del',['id'=>$val['id']])}">删除</a>
                                    </td>
                                </tr>
                            </foreach>

                            <else />
                            <tr>
                                <td colspan="6" align="center">没有会员</td>
                            </tr>
                        </notempty>
                        </tbody>
                    </table>

                    <div class="pull-right">
                                 <span class="pagination">
                                        {$page}
                                 </span>
                    </div>
                    <div class="clearfix"></div>
                </div>
            </div>

        </div>
        <!--content-main end-->
    </div>
</block>
